import { Vector2 } from "../vector";  
import { CameraPathPoint } from "../camera/path-effect";  
  
export interface ScriptAction {  
  type: ScriptActionType;  
  timestamp: number; // 相对于剧本开始的时间（毫秒）  
  data: any;  
}  
  
export enum ScriptActionType {  
  DIALOGUE = "dialogue",  
  CAMERA_MOVE = "camera_move",   
  CAMERA_ZOOM = "camera_zoom",  
  CAMERA_SHAKE = "camera_shake",  
  CAMERA_PATH = "camera_path",  
  PLAYER_MOVE = "player_move",  
  WAIT = "wait",  
  TRIGGER_EVENT = "trigger_event"  
}  
  
export interface DialogueAction {  
  type: string;  // "script" or "event"
  text: string;  
  duration: number;  
  speaker?: string;  
  bubbleOptions?: any;  
}  
  
export interface CameraMoveAction {  
  targetPos: Vector2;  
  duration: number;  
  easing?: string;  
}  
  
export interface CameraZoomAction {  
  targetZoom: number;  
  duration: number;  
  focusOnPlayer?: boolean;  
}  
  
export interface CameraShakeAction {  
  intensity: number;  
  duration: number;  
}  
  
export interface CameraPathAction {  
  path: CameraPathPoint[];  
  duration: number;  
  loop?: boolean;  
}  
  
export interface Script {  
  id: string;  
  name: string;  
  actions: ScriptAction[];  
  duration: number; // 总时长  
  repeatable?: boolean;  
}